/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package client;

import static client.SimpleClient.noteList;
import data.Note;
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.ObjectInputStream;
import java.util.LinkedList;
import util.MyDate;

/**
 *
 * @author WilliamCheng
 */
 

/**
 *
 * @author xiaoling
 */
import java.io.*;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.sql.Array;


/**
 *
 * @author xiaoling
 */
public class LINGBAO{

    public static void main(String args[]) throws Exception {
       noteList=new LinkedList<Note>();
	   Array notenum[] =(Array[]) noteList.toArray();
	  int n = noteList.size();
        ObjectInputStream ois = new ObjectInputStream(
                new FileInputStream("deal.dat"));
        String fileName = "dealReport.txt" ;
		BufferedWriter out = new BufferedWriter( 
                                              new  FileWriter( fileName ) );
    
    		
        for (int i = 0; i < n ;i++) {
            try {
                while (true) {
                    notenum[i] = (Array) (Note) ois.readObject();
                    System.out.println(notenum[i].title+notenum[i].content);
                    out.write(notenum[i].title+notenum[i].content);
                    out.newLine();
                }
            } catch (Exception e) {
                //System.out.println( " " + d[i] );
                ois.close();
                out.close();
            }
            

        }
                                                      ;

    }
}
